
#include "model/bridge.h"

Bridge::Bridge() : begin(0), end(0) {

}

Bridge::Bridge(Island* begin, Island* end) : begin(0), end(0) {
	this->connect(begin, end);
}

void Bridge::connect(Island* begin, Island* end) {
	this->begin = begin;
	this->end = end;

	begin->connectBridge(this);
	end->connectBridge(this);
}

Island* Bridge::getBegin() {
	return this->begin;
}

Island* Bridge::getEnd() {
	return this->end;
}
